package net.myjung.maven;

import java.util.ArrayList;
import java.util.List;

import net.myjung.model.BaseObject;
import net.myjung.model.annotation.MdlClass;
import net.myjung.model.annotation.MdlElement;
import net.myjung.model.annotation.MdlField;

@MdlClass(name = "Resource")
@SuppressWarnings("serial")
public class MvnResource extends BaseObject {
	@MdlField(type = "net.myjung.maven.MvnBuild")
	private MvnBuild _parent;
	@MdlElement(type = "string")
	private String directory;
	@MdlElement(singular = "include", type = "string")
	private List<String> includes;
	@MdlElement(singular = "exclude", type = "string")
	private List<String> excludes;

	public MvnBuild get_parent() {
		return _parent;
	}
	public void set_parent(MvnBuild _parent) {
		this._parent = _parent;
	}
	public String getDirectory() {
		return directory;
	}
	public void setDirectory(String directory) {
		this.directory = directory;
	}
	public List<String> getIncludes() {
		return includes;
	}
	public void setIncludes(List<String> includes) {
		this.includes = includes;
	}
	public void addInclude(String include) {
		if (this.includes == null)
			this.includes = new ArrayList<String>();
		this.includes.add(include);
	}
	public void removeInclude(String include) {
		if (this.includes == null || !this.includes.contains(include))
			return;
		this.includes.remove(include);
	}
	public List<String> getExcludes() {
		return excludes;
	}
	public void setExcludes(List<String> excludes) {
		this.excludes = excludes;
	}
	public void addExclude(String exclude) {
		if (this.excludes == null)
			this.excludes = new ArrayList<String>();
		this.excludes.add(exclude);
	}
	public void removeExclude(String exclude) {
		if (this.excludes == null || !this.excludes.contains(exclude))
			return;
		this.excludes.remove(exclude);
	}
}